namespace WP7Contrib.View.Controls
{
    using System;
    using System.Windows.Media.Animation;

    /// <summary>
    /// Provides an easing function for the tilt return
    /// </summary>
    internal class LogarithmicEase : EasingFunctionBase
    {
        /// <summary>
        /// Computes the easing function
        /// </summary>
        /// <param name="normalizedTime">The time</param>
        /// <returns>The eased value</returns>
        protected override double EaseInCore(double normalizedTime)
        {
            return Math.Log(normalizedTime + 1) / 0.693147181; // ln(t + 1) / ln(2)
        }
    }
}